<?php
class Solicitudes_Form_ValoracionSeccion extends Form_Base{
	
    protected $gradosEscala;
		
	public function __construct($options = null) {
		parent::__construct($options);
	}
	
	public function init() {
		$this->setName('valoracion');
		$this->setMethod("post");
		
		$elements[] = new Zend_Form_Element_Hidden("codtramiteseccion");
		$elements[] = new Zend_Form_Element_Hidden("codtramiteelemento");
		$elements[] = new Zend_Form_Element_Hidden("codescala");
		$elements[] = new Zend_Form_Element_Hidden("valoracion");

		$element = new Zend_Form_Element_Text("txtescala");
        $element->setLabel("Juicio : ");
        $element->helper = "formNote";
        $elements[] = $element;
        
        $element = new Zend_Form_Element_Text("txtvaloracion");
        $element->setLabel("Grado de cumplimiento : ");
        $element->helper = "formNote";
        $elements[] = $element;
		
        $element = new Zend_Form_Element_Text("porcentaje");
//        $element->setLabel("Valor porcentual : ");
        $element->helper = "formNote";
        $element->setAttrib("readonly", "readonly");
        $element->setAttrib("size", 7);
        $elements[] = $element;
        
        $element = new Zend_Form_Element_Textarea("justificacionvaloracion");
        $element->setLabel("Apreciación global del factor.");
		$element->setRequired(true);
        $element->addFilter('StripTags');
		$element->addFilter('StringTrim');
//		$element->addFilter('StringToUpper');
		$element->setAttrib("rows",5);
		$element->setAttrib("style","width:99%");
		$elements[] = $element;
       
		$element = new Zend_Form_Element_Submit('btnSubmit');
		$element->setLabel('Guardar');
		$element->setValue('Guardar');
		$element->setAttrib("class", "iceCmdBtn");
		$elements[] = $element;
		
		$this->addElements ($elements);
		
		$this->loadTableDecorators();
//	    $this->loadViewScriptDecorators();
	}
	
	public function loadViewScriptDecorators() {
		$this->setDecorators ( array (array ('viewScript', array ('viewScript' => 'viewscripts/valoracionseccion_form.phtml' ) ) ) );
	}
	
}
